var btn = document.getElementById('btn')

btn.onclick = function() {
  window.opener.postMessage("我是来自子窗口的信息~~")
  // window.opener.postMessage(msg, targetOrigin)
}